package com.luke.base.service.impl;

import java.util.List;

import com.luke.base.bo.DataCount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luke.base.mapper.LkUserMapper;
import com.luke.base.domain.LkUser;
import com.luke.base.service.ILkUserService;

/**
 * 用户信息Service业务层处理
 * 
 * @author luke
 * @date 2021-05-27
 */
@Service
public class LkUserServiceImpl implements ILkUserService 
{
    @Autowired
    private LkUserMapper lkUserMapper;

    /**
     * 查询用户信息
     * 
     * @param userId 用户信息ID
     * @return 用户信息
     */
    @Override
    public LkUser selectLkUserById(Long userId)
    {
        return lkUserMapper.selectLkUserById(userId);
    }

    /**
     * 查询用户信息列表
     * 
     * @param lkUser 用户信息
     * @return 用户信息
     */
    @Override
    public List<LkUser> selectLkUserList(LkUser lkUser)
    {
        return lkUserMapper.selectLkUserList(lkUser);
    }

    /**
     * 新增用户信息
     * 
     * @param lkUser 用户信息
     * @return 结果
     */
    @Override
    public int insertLkUser(LkUser lkUser)
    {
        return lkUserMapper.insertLkUser(lkUser);
    }

    /**
     * 修改用户信息
     * 
     * @param lkUser 用户信息
     * @return 结果
     */
    @Override
    public int updateLkUser(LkUser lkUser)
    {
        return lkUserMapper.updateLkUser(lkUser);
    }

    /**
     * 批量删除用户信息
     * 
     * @param userIds 需要删除的用户信息ID
     * @return 结果
     */
    @Override
    public int deleteLkUserByIds(Long[] userIds)
    {
        return lkUserMapper.deleteLkUserByIds(userIds);
    }

    /**
     * 删除用户信息信息
     * 
     * @param userId 用户信息ID
     * @return 结果
     */
    @Override
    public int deleteLkUserById(Long userId)
    {
        return lkUserMapper.deleteLkUserById(userId);
    }

    @Override
    public List<LkUser> selectLkUserByNoticeId(Long noticeId) {

        return lkUserMapper.selectLkUserByNoticeId(noticeId);
    }

    @Override
    public LkUser selectUserByPhonenumber(String phonenumber) {
        return lkUserMapper.selectUserByPhonenumber(phonenumber);
    }

    @Override
    public LkUser selectLkUserByParentId(Long userId) {
        return lkUserMapper.selectLkUserByParentId(userId);
    }

    @Override
    public DataCount getUserCount() {
        return lkUserMapper.getUserCount();
    }

    @Override
    public List<DataCount> userRegisterChart(String beginDate) {
        return lkUserMapper.userRegisterChart(beginDate);
    }
}
